<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Title</title>
    <script type="text/javascript" th:src="@{~/static/js/jquery-3.3.1.min.js}"></script>
    <script type="text/javascript">
        doPost = function () {
            $("form").attr('rememberMe', $('#rememberMe').is(':checked'));
            $("form").submit();
        }
    </script>
</head>
<body>
<div>
<a href="" th:href="@{/login(lang=en_US)}")>English(US)</a>
<a href="" th:href="@{/login(lang=zh_CN)}">简体中文</a>
</div>
<br>
<div class="alert alert-success" th:if="${msg}" th:utext="${msg}"></div>
<form th:action="@{/loginUser}" name="form" method="post">
    <div><label th:text="#{front.username}"> username</label>: <input type="text" name="username" th:placeholder="#{front.username}"/> </div>
    <div><label th:text="#{front.password}"> </label>: <input type="password" name="password" th:placeholder="#{front.password}"/> </div>
    <!--<div><label> 验证码 : <input type="text" name="captcha" placeholder="验证码"/> </label></div>-->
    <!--<div><img style="width: 47%; display: inline;" th:src="@{/kaptcha.jpg}" title="点击切换" id="kaptcha-img"/></div>-->
    <!--<div><a onclick="refreshCaptcha()">看不清?换一个试试</a></div>-->

    <div><label style="margin-top: 15px"> <input type="checkbox" name="rememberMe" th:text="#{front.remember.me}" onchange="rememberMeChange()"/></label></div>
    <div><input type="button" th:value="#{front.login}" onclick="doPost()"/></div>
</form>
</body>
</html>